package edu.gdit.health.controller;

import edu.gdit.health.model.TemperatureStatisticsModel;
import edu.gdit.health.service.impl.TemperatureStatisticsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author Lemon-7
 * @create 2021-05-15 10:09
 */
@Controller
public class TemperatureStatisticsController {
    @Autowired
    TemperatureStatisticsServiceImpl temperatureStatisticsService;
    @RequestMapping("/getStatistics")
    @ResponseBody
    public List<TemperatureStatisticsModel> getStatistics(){
        return temperatureStatisticsService.getStatistics();
    };
}
